#include"AlgBoruvkaPlugin.h" 
#include<stdio.h>

/*!
\file AlgBoruvkaPlugin.cpp
\brief Contains implementation of AlgBoruvkaPlugin.
\ingroup Plugins
*/

Algorithm *AlgBoruvkaPlugin::createAlgorithm( Graph *g ){
	return new AlgBoruvka(g);
}

bool AlgBoruvkaPlugin::canAcceptGraph( Graph *g ){
	bool ok = true;
	for( int i = 0; i < g->numEdges() && ok; i++ ){
		g->edge(i).label().toInt(&ok);
	}
	for(int i = 0; i < g->numNodes(); i++){
		if( g->node(i).identifier() != i )
			return false;
	}
	return ok && !g->isDirected();
}

#include<QtGui>
Q_EXPORT_PLUGIN2(algboruvkaplugin, AlgBoruvkaPlugin) 
 
 
 
